package com.freshminds.saudiproject;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class DashBoard extends Activity implements OnClickListener
{
 
	
	ImageView imgVwAbout,imgVwCourseContribute,imgVwSemister,imgVwCourseOutline,imgVwCourseManual,imgVwFeedback;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_dashboard);
		
		imgVwAbout=(ImageView)findViewById(R.id.ximgVwAbout);
		imgVwCourseContribute=(ImageView)findViewById(R.id.ximgVwCourseContribute);
		imgVwSemister=(ImageView)findViewById(R.id.ximgVwSemister);
		imgVwCourseOutline=(ImageView)findViewById(R.id.ximgVwCourseOutline);
		imgVwCourseManual=(ImageView)findViewById(R.id.ximgVwCourseManual);
		imgVwFeedback=(ImageView)findViewById(R.id.ximgVwFeedback);
		
		imgVwAbout.setOnClickListener(this);
		imgVwCourseContribute.setOnClickListener(this);
		imgVwSemister.setOnClickListener(this);
		imgVwCourseOutline.setOnClickListener(this);
		imgVwCourseManual.setOnClickListener(this);
		imgVwFeedback.setOnClickListener(this);
		
		
		
		
		findBottomMenuView();
	}
	
	void findBottomMenuView()
	{
		ImageView imgVwFeatured,imgVwMostViewed,imgVwMyFavourites,imgVwSendToFriend;
		
		imgVwFeatured=(ImageView)findViewById(R.id.ximgVwFeatured);
		imgVwMostViewed=(ImageView)findViewById(R.id.ximgVwMostViewed);
		imgVwMyFavourites=(ImageView)findViewById(R.id.ximgVwMyFavourites);
		imgVwSendToFriend=(ImageView)findViewById(R.id.ximgVwSendToFriend);
		
		imgVwFeatured.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(DashBoard.this);
				utility.showToast("Button Clicked");
				
			}
		});
		
		imgVwMostViewed.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				startActivity(new Intent(DashBoard.this, MostViewed.class));
				
			}
		});
		
		imgVwMyFavourites.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(DashBoard.this);
				utility.showToast("Button Clicked");
				
			}
		});

		imgVwSendToFriend.setOnClickListener(new OnClickListener()
		{
	
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(DashBoard.this);
				utility.showToast("Button Clicked");
				
			}
		});
		
		
		
		
	}

	@Override
	public void onClick(View v) 
	{
		switch (v.getId()) 
		{
		case R.id.ximgVwAbout:				
			      startActivity(new Intent(DashBoard.this, AboutDoctor.class));
			break;
		case R.id.ximgVwCourseContribute:
			startActivity(new Intent(DashBoard.this, CourseContributors.class));	
					break;
		case R.id.ximgVwSemister:
			//finish();
			startActivity(new Intent(DashBoard.this, SemisterActivity.class));
			break;
		case R.id.ximgVwCourseOutline:
			
			break;
		case R.id.ximgVwCourseManual:
			
			break;
		case R.id.ximgVwFeedback:
			//finish();
			startActivity(new Intent(DashBoard.this, FeedbackActivity.class));
			break;

		default:
			break;
		}
		
	}
	
}
